package OOP.Day04.Work03;
import java.util.Scanner;
public class Test {
    public static void main(String[] args) {
        Counter counter = new Counter();
        Scanner scanner = new Scanner(System.in);
        System.out.println("请选择你要的方法:(1,加   2,减   3,乘   4,除)");
        int num1 =scanner.nextInt();
        System.out.print("请输入第一个数:");
        int num11 = scanner.nextInt();
        System.out.print("请输入第二个数:");
        int num12 = scanner.nextInt();
        int num2 = counter.Sum(num1,num11,num12);
        System.out.println("结果为:"+num2);

        System.out.println();

        System.out.print("请输入求累加开始值:");
        int num51 = scanner.nextInt();
        System.out.print("请输入求累加结束值:");
        int num61 = scanner.nextInt();
        int num71 = counter.LeiJia(num51, num61);
        System.out.println("累加的结果为:"+num71);

        System.out.println();

        System.out.print("请输入一个值求阶乘:");
        int num3 = counter.JieCheng(scanner.nextInt());
        System.out.println("阶乘的结果为:"+num3);

        System.out.println();

        System.out.print("请输入一个值求平方:");
        int num4 = counter.Square(scanner.nextInt());
        System.out.println("平方的结果为:"+num4);

        System.out.println();

        System.out.print("请输入一个值求次方:");
        int num5 = scanner.nextInt();
        System.out.print("请输入要求的次方数:");
        int num6 = scanner.nextInt();
        int num7 = counter.Power(num5, num6);
        System.out.println("次方的结果为:"+num7);

        System.out.println();

        System.out.print("请输入一个数判断是否是素数:");
        counter.Prime(scanner.nextInt());

    }

}
